<template>
  <div>
    <footer class="footer">
      <div class="clearfix"></div>
      <div class="icon-row">
        <div class="footer-icon flex flex-a-c">
          <h5 class="footer-icon-child">C</h5>
          <span class="footer-icon-text">Complete range</span>
        </div>
        <div class="footer-icon flex flex-a-c">
          <h5 class="footer-icon-child footer-icon-child-2">M</h5>
          <span class="footer-icon-text">Multi-warehouse straight hair</span>
        </div>
        <div class="footer-icon flex flex-a-c">
          <h5 class="footer-icon-child footer-icon-child-3">G</h5>
          <span class="footer-icon-text">Genuine goods</span>
        </div>
        <div class="footer-icon flex flex-a-c">
          <h5 class="footer-icon-child footer-icon-child-4">E</h5>
          <span class="footer-icon-text">Every day low price</span>
        </div>
      </div>
      <div class="service-intro">
        <div class="servece-type">
          <div class="servece-type-info" v-for="(guide, index) in guideArr" :key="index">
            <ul>
              <li v-for="(item, index) in guide" :key="index" @click="goArticle">{{ item }}</li>
            </ul>
          </div>
        </div>
        <div class="clearfix"></div>
        <div class="friend-link flex">
          <div class="friend-link-item">
            <ul>
              <li v-for="(link, index) in moreLink" :key="index" @click="goArticle(link.url)">
                <span class="link-item">{{ link.name }}</span>
              </li>

            </ul>

          </div>

        </div>

        <div class="clearfix"></div>
        <div class="copyright">
          <p>Copyright © {{ year }} MateShop</p>
        </div>
      </div>
    </footer>
  </div>
</template>

<script>

export default {
  name: "Footer",
  data() {
    return {
      config: require('@/config'),
      guideArr: [
        // 导航链接
        [" Shopping Guide ", "Shopping Process ", " Member Introduction ", "Life Travel ", " Frequently Asked Questions "],
        [" Delivery method ", "home pick-up ", " delivery inquiry ", "charging standard ", " logistics rules "],
        [" Payment Method ", "Online Payment ", " Company transfer "],
        [" After-sales Service ", "After-sales Policy ", " Refund Instructions ", "Repair/return ", " Cancel order "],
      ],
      // moreLink: ["About Us"," Contact Us ", "Privacy Policy","Return Policy", "Shipping Information","TermsAndConditions"], // 更多链接
      moreLink: [
        {
          name: 'About Us',
          url: 'https://cdn-mate.matelink.com/image/avatar/image_a593ac6af58b4052b083bc9eaa.html'
        },
        {
          name: 'Contact Us',
          url: 'https://cdn-mate.matelink.com/image/avatar/image_87381389606044cc80affdbc5e.html'
        },
        {
          name: 'Privacy Policy',
          url: 'https://cdn-mate.matelink.com/image/avatar/image_8233e8ed4c6243b2942bd07b9e.html'
        },
        {
          name: 'Return Policy',
          url: 'https://cdn-mate.matelink.com/image/avatar/image_3d0eae6d503b4e4dae7a60dc87.html'
        },
        {
          name: 'Shipping Information',
          url: 'https://cdn-mate.matelink.com/image/avatar/image_580fde1ad3f347aebcb1984e2e.html'
        },
        {
          name: 'TermsAndConditions',
          url: 'https://cdn-mate.matelink.com/image/avatar/image_d2101678a857459a8eb3cf5e18.html'
        },
      ],
      year: new Date().getFullYear(), // 当前年份
    };
  },
  methods: {
    goArticle(url) {
      if (url) {
        // 跳转链接
        window.open(url, "_blank");
      } else {
        // 跳转文章页
        let routeUrl = this.$router.resolve({
          path: "/article",
        });
        window.open(routeUrl.href, "_blank");
      }
    },
  },
};
</script>

<style scoped lang="scss">
/*****************************底 部 开 始*****************************/
.footer {
  width: 100%;
  height: 370px;
  background: #FFFFFF;
}

.icon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 1056px;
  height: 71px;
  margin: 0 auto;
}

.footer-icon {
  float: left;
}

.footer-icon-child {
  overflow: hidden;
  width: 36.4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18.2px;
  font-weight: normal;
  color: #333;
  height: 36.4px;
  border: 1.4px solid #CECECE;
  border-radius: 50%;
}

.icp {
  margin-right: 30px !important;

  >* {
    margin: 0 4px;
  }

  flex-direction: column;
}

.flex {
  display: flex;
  align-items: center;

  >img {
    margin-right: 4px;
  }
}

.footer-icon-text {
  margin-left: 11px;
  font-size: 16px;

  font-weight: normal;

  text-align: center;
}

.service-intro {
  width: 100%;
  border-top: 1px solid $border_color;
}

.servece-type {
  width: 952px;
  margin: 22px auto 10px auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;

}

.servece-type-info {}

.servece-type-info ul {
  list-style: none;
}

.servece-type-info li {
  font-size: 12px;
  cursor: pointer;
  font-weight: normal;
  line-height: 15px;
  text-align: center;
  margin-bottom: 13px;
  color: #333;
}

.servece-type-info li:first-child {
  font-size: 14.82px;
  font-weight: normal;
  line-height: 18px;

  letter-spacing: 0px;
  margin-bottom: 17px;
  color: #333333;
}

.friend-link {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 908px;
  padding: 10px 0;
  margin: 0px auto;
  border-top: 1px solid $border_color;
}

.information {
  margin-top: 23px;
  margin-bottom: 21px;
  display: flex;
  justify-content: center;

}

a {
  color: #3457FF;
}

.zhizhao {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.friend-link-item ul {
  list-style: none;
}

.friend-link-item li {
  padding: 5px 0px;
  float: left;
  margin-right: 40px;
  font-weight: normal;
  line-height: 13px;
  color: #333333;
}



.link-item {
  padding: 0px 8px;
  cursor: pointer;

}

.link-last-item {
  border: none;
}

.copyright {
  width: 100%;
  cursor: pointer;
  text-align: center;
  height: 25px;
  opacity: 1;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: normal;
  line-height: 13px;

  letter-spacing: 0px;

  color: #959595;
}

.footer-icon-text {
  @include title_color($light_title_color);
}

.copyright,
.friend-link,
.servece-type-info {
  @include sub_color($light_sub_color);
}

/*****************************底 部 结 束*****************************/
</style>
